package com.dzh.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName loans
 */
@TableName(value ="loans")
@Data
public class Loans implements Serializable {
    /**
     * 表id
     */
    @TableId(type = IdType.AUTO)
    private Integer lid;

    /**
     * 本金
     */
    private Long principal;

    /**
     * 利率
     */
    private Long interestrate;

    /**
     * 借贷日期
     */
    private Date borrowtime;

    /**
     * 还款日期
     */
    private Date returntime;

    /**
     * 还款方式
     */
    private Integer rid;

    /**
     * 贷款状态
     */
    private String rtype;

    /**
     * 贷款用户
     */
    private Integer uid;

    /**
     * 贷款产品id
     */
    private Integer pid;

    /**
     * 应还金额
     */
    private Long money;

    /**
     * 提现状态
     */
    private String withdraw;

    /**
     * 还款期数
     */
    private Integer numbe;

    /**
     * 提前还款期数
     */
    private Integer advancenumbe;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Loans other = (Loans) that;
        return (this.getLid() == null ? other.getLid() == null : this.getLid().equals(other.getLid()))
            && (this.getPrincipal() == null ? other.getPrincipal() == null : this.getPrincipal().equals(other.getPrincipal()))
            && (this.getInterestrate() == null ? other.getInterestrate() == null : this.getInterestrate().equals(other.getInterestrate()))
            && (this.getBorrowtime() == null ? other.getBorrowtime() == null : this.getBorrowtime().equals(other.getBorrowtime()))
            && (this.getReturntime() == null ? other.getReturntime() == null : this.getReturntime().equals(other.getReturntime()))
            && (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid()))
            && (this.getRtype() == null ? other.getRtype() == null : this.getRtype().equals(other.getRtype()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getWithdraw() == null ? other.getWithdraw() == null : this.getWithdraw().equals(other.getWithdraw()))
            && (this.getNumbe() == null ? other.getNumbe() == null : this.getNumbe().equals(other.getNumbe()))
            && (this.getAdvancenumbe() == null ? other.getAdvancenumbe() == null : this.getAdvancenumbe().equals(other.getAdvancenumbe()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLid() == null) ? 0 : getLid().hashCode());
        result = prime * result + ((getPrincipal() == null) ? 0 : getPrincipal().hashCode());
        result = prime * result + ((getInterestrate() == null) ? 0 : getInterestrate().hashCode());
        result = prime * result + ((getBorrowtime() == null) ? 0 : getBorrowtime().hashCode());
        result = prime * result + ((getReturntime() == null) ? 0 : getReturntime().hashCode());
        result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode());
        result = prime * result + ((getRtype() == null) ? 0 : getRtype().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getWithdraw() == null) ? 0 : getWithdraw().hashCode());
        result = prime * result + ((getNumbe() == null) ? 0 : getNumbe().hashCode());
        result = prime * result + ((getAdvancenumbe() == null) ? 0 : getAdvancenumbe().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", lid=").append(lid);
        sb.append(", principal=").append(principal);
        sb.append(", interestrate=").append(interestrate);
        sb.append(", borrowtime=").append(borrowtime);
        sb.append(", returntime=").append(returntime);
        sb.append(", rid=").append(rid);
        sb.append(", rtype=").append(rtype);
        sb.append(", uid=").append(uid);
        sb.append(", pid=").append(pid);
        sb.append(", money=").append(money);
        sb.append(", withdraw=").append(withdraw);
        sb.append(", numbe=").append(numbe);
        sb.append(", advancenumbe=").append(advancenumbe);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}